package persistence;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the Firm_has_Employees database table.
 * 
 */
@Entity
@Table(name="Firm_has_Employees")
public class Firm_has_Employee implements Serializable {
	private static final long serialVersionUID = 1L;
	private Firm_has_EmployeePK id;
	private String number;
	private Employee employee;
	private Firm firm;

    public Firm_has_Employee() {
    }


	@EmbeddedId
	public Firm_has_EmployeePK getId() {
		return this.id;
	}

	public void setId(Firm_has_EmployeePK id) {
		this.id = id;
	}
	

	public String getNumber() {
		return this.number;
	}

	public void setNumber(String number) {
		this.number = number;
	}


	//bi-directional many-to-one association to Employee
    @ManyToOne
	@JoinColumn(name="Employees_idEmployees",insertable=false,updatable=false)
	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	

	//bi-directional many-to-one association to Firm
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="Firm_crd", referencedColumnName="crd",insertable=false,updatable=false),
		@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm",insertable=false,updatable=false)
		})
	public Firm getFirm() {
		return this.firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}
	
}